<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
   $(function(){
	   $(".search").focus(function cls() {
			//alert("324");
			if ($(this).val() == "检索信息") 
				{
				$(this).val("");
				}
	    });
	    $(".search").blur(function res() {
	    	//alert("324");
	    	if ($(this).val() == "")
	    		$(this).val("检索信息");
	       
	    });
	   $("#searchbtn").click(function(){
		  // alert($("#nbkind").val());
           $("#nbtypehi1").val($("#nbkind").val());
	   });
	    function getContent() {
	    	
            
	    };
   });
    	
</script>

<c:if test="${success==true }">
   <div class="ts" style='height:40px;padding:1px;width:90%;'>
	  <div style='margin-top:15px;'><p align="center" style='color:'>添加成功</p></div>
	</div>
</c:if>
<c:if test="${success==false }">
   <div class="ts" style='height:40px;padding:1px;width:90%;'>
	  <div style='margin-top:15px;'><p align="center" style='color:'>添加失败</p></div>
	</div>
</c:if>

<div>
<div class='span5'>
		<form action="<%=basePath%>backend/searchxxydres/1" method="post">
			<input type="text"  value="检索信息" id='search'
				class="init search1" name='xxydtitle' style=' margin-top: 10px;'>
			
			 <input
				class='btn' type="submit" id='searchbtn' value="找找看"
				>
		</form>
	</div>
	<table style="width: 100%" class="table table-hover article-table">
	          <c:choose>
					<c:when test="${empty xxyds }">
						<tr>
							<td colspan="3" style="color: red" align="center">暂时没有专业信息</a></td>
						</tr>
					</c:when>
					<c:when test="${not empty xxyds}">
					    <tr>
					       <td style='' class=''>标题</td>
					      <td style='' class=''>类型</td>
					       <td  class=''>操作</td>
					    </tr>
					    <c:forEach items="${xxyds }" var="news" varStatus="status">
						
							<tr class='discuss'>
								<td class=" ">
								    <div class=''><a
									title='${news.xyydName}'>
									<span >${news.xyydName}</span>
									</a></div>
								</td>
								<td class=" ">
								    <div class=''><a
									title='${news.xyydtId.xyydtypeName}'>
									<span >${news.xyydtId.xyydtypeName}</span>
									</a></div>
								</td>  
								<td class=""><a href='#'><button te='${news.xyydId }' backurl='xxydmgui/1' style='width:80px;' url='delxxyd' class='del btn btn-danger'>删除</button></a>
								  |	<a href='<%=basePath %>backend/updatexxyd/${news.xyydId }' style='width:80px;' class="update btn btn-warning"  >
                                                                                          修改
                                   </a>
                                   <!-- Modal -->
                           
								</td>
						</c:forEach>
						
					</c:when>
				</c:choose>
				</table>
				<c:if test="${not empty xxyds }">
				<c:if test="${!searchresult }">
						  <div id="" class="span12" style='margin-left:40%;margin-top:10px;'>
		   
	   <p> <a href='<%=basePath%>backend/xxydmgui/1 '>【首	页】</a>
	   <a href='<%=basePath%>backend/xxydmgui/${pagenow-1 } ' id="first">【上一页】</a>
	   <a  class="pagenow">
	   <strong style='color:red;font-size:16px;'>${pagenow}</strong></a>...
	   <a href='<%=basePath%>backend/xxydmgui/${pagecount }'>${pagecount }</a>
	   <a href='<%=basePath%>backend/xxydmgui/${pagenow+1 } ' id="next">【下一页】</a>
	   <a href='<%=basePath%>backend/xxydmgui/${pagecount } '>【末	页】</a>
	   </p>
	   <script type="text/javascript">
	   $(function(){
		   var page = ${pagenow};
		   
		   var pagecount = ${pagecount};
		 
		   if(parseFloat(page)+1 >parseFloat(pagecount))
			   {
			       $("#next").hide();
			   }
		   if(parseFloat(page)-1 <1)
			   {
			     $("#first").hide();
			   }else{
				   $("#first").show();
			   };
			  
	   });
	</script>
	</div>
						</c:if>
						<c:if test="${searchresult }">
						  <div id="" class="span12" style='margin-left:40%;margin-top:10px;'>
		   
	   <p> <a href='<%=basePath%>backend/searchxxydres/1 '>【首	页】</a>
	   <a href='<%=basePath%>backend/searchxxydres/${pagenow-1 } ' id="first">【上一页】</a>
	   <a  class="pagenow">
	   <strong style='color:red;font-size:16px;'>${pagenow}</strong></a>...
	   <a href='<%=basePath%>backend/searchxxydres/${pagecount }'>${pagecount }</a>
	   <a href='<%=basePath%>backend/searchxxydres/${pagenow+1 } ' id="next">【下一页】</a>
	   <a href='<%=basePath%>backend/searchxxydres/${pagecount } '>【末	页】</a>
	   </p>
	   <script type="text/javascript">
	   $(function(){
		   var page = ${pagenow};
		   
		   var pagecount = ${pagecount};
		 
		   if(parseFloat(page)+1 >parseFloat(pagecount))
			   {
			       $("#next").hide();
			   }
		   if(parseFloat(page)-1 <1)
			   {
			     $("#first").hide();
			   }else{
				   $("#first").show();
			   };
			  
	   });
	</script>
	</div>
						</c:if></c:if>
</div>